package com.diaohw.module.system.obj.entity;

import com.diaohw.platform.framework.db.flex.obj.model.BaseModel;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Table;
import com.mybatisflex.core.handler.JacksonTypeHandler;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

/**
 * 角色 实体类。
 *
 * @author D-Hw
 * @since 2024-11-15 18:22:15
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Schema(description = "角色")
@Table("ROLE")
public class Role extends BaseModel implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 角色名称
     */
    @Column("ROLE_NAME")
    @Schema(description = "角色名称")
    private String roleName;

    /**
     * 角色code
     */
    @Column("ROLE_CODE")
    @Schema(description = "角色code")
    private String roleCode;

    /**
     * 角色类型;0：功能角色， 1：数据角色
     */
    @Column("ROLE_TYPE")
    @Schema(description = "角色类型;0：功能角色， 1：数据角色")
    private Integer roleType;

    /**
     * 状态;0：禁用，1：启用
     */
    @Column("STATE")
    @Schema(description = "状态;0：禁用，1：启用")
    private Integer state;

    /**
     * 备注
     */
    @Column("REMARK")
    @Schema(description = "备注")
    private String remark;

    /**
     * 菜单ID
     */
    @Column(value = "MENU_ID", typeHandler = JacksonTypeHandler.class)
    @Schema(description = "菜单ID")
    private List<String> menuId;

    /**
     * 权限ID
     */
    @Column(value = "PERMISSION_ID", typeHandler = JacksonTypeHandler.class)
    @Schema(description = "权限ID")
    private List<String> permissionId;


}
